/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.game.math.view.action;

import java.util.ResourceBundle;
import javax.swing.AbstractAction;
import javax.swing.Action;
import org.game.math.view.config.Configure;

/**
 *
 * @author nmduc
 */
abstract class AbstractToggleAction(name:String, configure:Configure) extends AbstractAction(name:String) {

  protected def isSelected():Boolean = {
    this.getValue(Action.SELECTED_KEY).asInstanceOf[Boolean];
  }

  def setSelected(isSelected:Boolean):Unit = {
    super.putValue(Action.SELECTED_KEY, isSelected);
  }

}
object AbstractToggleAction {
  val resourceBundle:ResourceBundle =
    ResourceBundle.getBundle("org.game.math.view.action.AbstractToggleAction");
}